package org.raymond.iworks.study.basic.designpattern.observer.improve;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Baidu implements Observer{
    private float temperature;
    private float pressure;
    private float humidity;

    public void update(float temperature, float pressure, float humidity){
        this.temperature = temperature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }
    public void display(){
        System.out.println("temperature: **"+temperature+"**");
        System.out.println("pressure: **"+pressure+"**");
        System.out.println("humidity: **"+humidity+"**");
    }
}
